home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
8_5.lha
/
8_5
/
gets.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
384b
|
19 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ read a string up to a newline, discarding the newline
include <limits.h>
har *gets(char *buf)
if ((stdin->mode == input) &&
stdin->in->get(buf, INT_MAX))
{
char c;
stdin->in->get(c);
return buf;
}
return NULL;